class Solution {
    public ListNode getKthFromEnd(ListNode head, int k) {
        if(null == head || 0 == k) {
            return null;
        }
        ListNode fast = head;
        ListNode slow = head;
        while(k>0) {
            fast = fast.next;
            k--;
        }
        while(null != fast) {
            slow = slow.next;
            fast = fast.next;
        }
        
        return slow;

    }
}